import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

from matplotlib.pyplot import MultipleLocator
df_news = pd.read_table('data.txt',header = None)

t = df_news[0]
x = df_news[1]
y = df_news[2]*3.6

plt.plot(x,'r-',linewidth=3, label="cmd_speed")
plt.plot(y,'b-',linewidth=3, label="state_speed")

#plt.axis('equal')
plt.legend()
plt.grid('on')

plt.xlim(0,1)
#x_major_locator=MultipleLocator(1)
#y_major_locator=MultipleLocator(1)
ax=plt.gca()
#ax.xaxis.set_major_locator(x_major_locator)
#ax.yaxis.set_major_locator(y_major_locator)

plt.axis([0, len(x), 0, np.max(y)])
plt.show()
